n = int(input())
mylist = []
for i in range(n):
    t = int(input())
    mylist.append(t)
average = sum(mylist) / len(mylist)

every = [num for num in mylist if num > average]
ret = (average,)+tuple(every)
print(ret)